In present day connected component labeling and contour tracking are widely deployed for computer vision and video analytics applications. The connected component is particularly used to detect connected regions within a binary digital image. The connected component technique analyzes an image and labels the image according to defined rules for connection, with each component being assigned a distinct label. In one example, connected component labeling scans an image, pixel-by-pixel in order to identify connected pixel regions where the connected component is defined by regions of adjacent pixels which share the same set of intensity values. The number of distinct connected components in the image is defined by the number of labels used in the image excluding the background. The contour tracking technique that may be applied in conjunction with connected component analysis includes two components: a bounding box that circumscribes and an ordered list of boundary pixels of each component.
There are various software solutions for doing connected component and contour tracking. One approach employed in connected component labeling is to scan an image and assign labels to each pixel until the labels for the pixels no longer change. This approach is slow because the labels propagate one layer in an iteration. One strategy to speed up this process is to employ a two-pass algorithm. This two pass algorithm uses a data structure to record label equivalence information. It scans the image once to assign provisional labels and discover the label equivalence information, and scans the image a second time to assign the final labels.
An additional problem associated with present day connected component and contour tracking approaches is the use of excessive cache memory and the frequent need to read an entire image more than once to complete the analysis.
Accordingly, there may be a need for improved techniques and apparatus to solve these and other problems.